<!DOCTYPE html>
<html>
  <head>
    <meta charset="utf-8">
    <link href="/Show/Admin/Public/css/news.css" type="text/css" rel="stylesheet">
    <script type="text/javascript" src="/Show/Admin/Public/js/jquery-3.1.1.min.js"></script>
    {literal}
    <script type="text/javascript">
        $(document).ready(function(){
            $("input").change(function(){
                var id   = $(this).attr('fd');
                var sort = $(this).val();
                $.post('sort_change',{id:id,sort:sort},function(data){
                    if(data){
                        alert(data);
                    }
                });
            });
        });
    </script>
    {/literal}
    <title>轮播图</title>
  </head>
  <body>
    <form action="{$smarty.const.__CONTROLLER__}/delete" method="post">
    <div class="mainbox">
          <div class="tablebox">            
            <table class="table" >
              <tr class="one">
                <td>ID</td>
                <td>图片</td>
                <td>排序</td>
                <td>操作</td>
              </tr>
              <tr>
                  <td colspan="4"><strong>首页轮播</strong></td>
              </tr>
              {section name=n loop=$list}
              <tr>
                  <td>{$list[n].round_id}</td>
                  <td><img src="{$list[n].round_address}" width="88" height="45"></td>
                  <td><input type="text" fd="{$list[n].round_id}" value="{$list[n].round_sort}"></td>
                  <td>
                     <a href="#" onclick="if(confirm('确定删除？'))location.href='{$smarty.const.__CONTROLLER__}/delete/id/{$list[n].round_id}';"><img src="/Show/Admin/Public/image/del.jpg" class="pit" title="删除"></a>
                     <a href="#" onclick="location.href='{$smarty.const.__CONTROLLER__}/xiugai/id/{$list[n].round_id}'" ><img src="/Show/Admin/Public/image/edi.jpg" class="pit" title="编辑"></a>
                  </td>
              </tr>
              {/section}
              <tr>
                  <td colspan="4"><strong>新闻轮播</strong></td>
              </tr>
              {section name=n loop=$nlist}
              <tr>
                  <td>{$nlist[n].round_id}</td>
                  <td><img src="{$nlist[n].round_address}" width="88" height="45"></td>
                  <td><input type="text" value="{$nlist[n].round_sort}"></td>
                  <td>
                     <a href="#" onclick="if(confirm('确定删除？'))location.href='{$smarty.const.__CONTROLLER__}/delete/id/{$nlist[n].round_id}';"><img src="/Show/Admin/Public/image/del.jpg" class="pit" title="删除"></a>
                     <a href="#" onclick="location.href='{$smarty.const.__CONTROLLER__}/xiugai/id/{$nlist[n].round_id}'" ><img src="/Show/Admin/Public/image/edi.jpg" class="pit" title="编辑"></a>
                  </td>
              </tr>
              {/section}
         
            </table>          
          </div>
    </div>
    </form>
  </body>
</html>